package com.peycard.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;

import java.sql.Timestamp;
import java.math.BigDecimal;
import java.util.Set;


/**
 * The persistent class for the READER_CONTROL database table.
 * 
 */
@Entity
@Table(name="READER_CONTROL")
@NamedQueries({
	@NamedQuery(name="findReaderControl_1", query="SELECT r FROM ReaderControl r where r.brand like :brand_1 and r.model like :model_1"),
	@NamedQuery(name="findAllReadersControl_1", query="SELECT r FROM ReaderControl r")
})
public class ReaderControl implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="READER_CONTROL_IDREADERCONTROL_GENERATOR", sequenceName="ID_READER_CONTROL_GENERATOR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="READER_CONTROL_IDREADERCONTROL_GENERATOR")
	@Column(name="ID_READER_CONTROL")
	private long idReaderControl;

	@Column(name="ADDITIONAL_DATA1")
	private String additionalData1;

	@Column(name="ADDITIONAL_DATA2")
	private String additionalData2;

	@Column(name="ADDITIONAL_DATA3")
	private String additionalData3;

	private String brand;

	@Column(name="IS_ACTIVE")
	private BigDecimal isActive;

	private String model;

	private String platform;

	@Column(name="SAVE_DATA")
	private Timestamp saveData;

	private String username;

	//bi-directional many-to-one association to ReaderList
	@OneToMany(mappedBy="readerControl")
	private Set<ReaderList> readerLists;

    public ReaderControl() {
    }

	public long getIdReaderControl() {
		return this.idReaderControl;
	}

	public void setIdReaderControl(long idReaderControl) {
		this.idReaderControl = idReaderControl;
	}

	public String getAdditionalData1() {
		return this.additionalData1;
	}

	public void setAdditionalData1(String additionalData1) {
		this.additionalData1 = additionalData1;
	}

	public String getAdditionalData2() {
		return this.additionalData2;
	}

	public void setAdditionalData2(String additionalData2) {
		this.additionalData2 = additionalData2;
	}

	public String getAdditionalData3() {
		return this.additionalData3;
	}

	public void setAdditionalData3(String additionalData3) {
		this.additionalData3 = additionalData3;
	}

	public String getBrand() {
		return this.brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public BigDecimal getIsActive() {
		return this.isActive;
	}

	public void setIsActive(BigDecimal isActive) {
		this.isActive = isActive;
	}

	public String getModel() {
		return this.model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getPlatform() {
		return this.platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public Timestamp getSaveData() {
		return this.saveData;
	}

	public void setSaveData(Timestamp saveData) {
		this.saveData = saveData;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Set<ReaderList> getReaderLists() {
		return this.readerLists;
	}

	public void setReaderLists(Set<ReaderList> readerLists) {
		this.readerLists = readerLists;
	}
	
}